﻿@using System.Linq
@model MrCMS.Entities.Multisite.Site
<div id="restricted-domains">
    <hr />
    <div class="pull-right">
        @Html.ActionLink("Add", "Add", "RedirectedDomain", new { id = Model.Id }, new { @class = "btn btn-default btn-xs", data_toggle = "fb-modal" })
    </div>
    <h4>@Resource("Admin Redirected Domains", "Redirected Domains")</h4>
    @if (Model.RedirectedDomains.Any())
    {
        <table class="table table-striped table-condensed">
            <thead>
                <tr>
                    <th>Url
                    </th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                @foreach (var domain in Model.RedirectedDomains)
                {
                    <tr>
                        <td>@domain.Url</td>
                        <td>@Html.ActionLink("Remove", "Delete", "RedirectedDomain", new {id = domain.Id}, new {@class = "btn btn-danger btn-xs", data_toggle = "fb-modal"})</td>
                    </tr>
                }
            </tbody>
        </table>
    }
    else
    {
        <p>@Resource("Admin Redirected Domains None", "There are currently no redirected domains for this site")</p>
    }
</div>
